/**
 * @filename:SaleOutStockDetailController Feb 19, 2025
 * @project Wonder Vue Admin Api  1.1.0
 * Copyright(c) 2020 Wonder Co. Ltd. 
 * All right reserved. 
 */
package com.wonder.api.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.wonder.app.domain.SaleOutStockDetail;
import com.wonder.app.service.SaleOutStockDetailService;
import com.wonder.app.request.SaleOutStockDetailRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wonder.common.common.AjaxResult;
import com.wonder.common.utils.ThreadLocalUtil;
import com.wonder.common.utils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParam;
/**   
 * 
 * <p>说明： 销售出库单详情API接口层</P>
 * @version: 1.1.0
 * @author: Wonder
 * @time    Feb 19, 2025
 *
 */
@Api(tags = "销售出库单详情")
@RestController
@RequestMapping("/app/SaleOutStockDetail")
public class SaleOutStockDetailController {
	
	@Autowired
	private SaleOutStockDetailService saleOutStockDetailService;
	
	/**
	 * @explain 获取销售出库单详情列表
	 * @return  Map<String,Object>
	 * @author  Wonder
	 */
	@ApiOperation(value = "获取销售出库单详情列表")
	@RequestMapping(value = "/list", method = RequestMethod.POST)
	public AjaxResult<Object> list() {
	    if(ThreadLocalUtil.get("uid")==null)
			return AjaxResult.unauthorized();
		Long uid=Long.parseLong(ThreadLocalUtil.get("uid").toString());
        return AjaxResult.success(saleOutStockDetailService.list(new QueryWrapper<SaleOutStockDetail>().eq("uid", uid).orderByDesc("id")));
	    
	}	
	
}